VERSION 5.00
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form ErrorForm 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "SICCS - Error en la consulta"
   ClientHeight    =   3255
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6255
   Icon            =   "ErrorForm.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3255
   ScaleWidth      =   6255
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.TextBox txtError 
      Height          =   1935
      Left            =   120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   720
      Width           =   6015
   End
   Begin MSForms.CommandButton CmdSalir 
      Height          =   375
      Left            =   4680
      TabIndex        =   2
      Top             =   2760
      Width           =   1455
      Caption         =   "  Salir"
      PicturePosition =   327683
      Size            =   "2566;661"
      Picture         =   "ErrorForm.frx":058A
      Accelerator     =   83
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin VB.Label LabMensaje 
      Caption         =   $"ErrorForm.frx":06E4
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6015
      WordWrap        =   -1  'True
   End
End
Attribute VB_Name = "ErrorForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public Sub cargarMensaje(mensaje As String, _
                         errorVar As ErrObject)
    Me.txtError.Text = mensaje & ": " & FinDeLinea & _
                       errorVar.Number & " - " & errorVar.Description
    'y guarda el error completo en un archivo de texto en la carpeta logs
    Dim fecha As Date
    fecha = Now
    Dim fechacad As String
    fechacad = Format(fecha, "General Date")
    fechacad = Strings.Replace(fechacad, "/", "")
    fechacad = Strings.Replace(fechacad, ":", "")
    fechacad = Strings.Replace(fechacad, " ", "")
    
    MUtiles.debugtxt Me.txtError.Text, "error" & fechacad & ".txt"
End Sub

Private Sub CmdSalir_Click()
    Unload Me
End Sub


